﻿/*----------------------------------------------------------------
//文件功能描述：订单分页查询对象。
//创建人：赵国伟
//创建时间：2012-04-08 13:49:54
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shopping.Common;

namespace Shopping.Model
{
    public class QueryOrdersAsPage : AsPage
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderID;

        /// <summary>
        /// 订购人；
        /// </summary>
        public string UserName;

        /// <summary>
        /// 用户ID;
        /// </summary>
        public int UserID;

        /// <summary>
        /// 支付方式
        /// </summary>
        public string PayMode;

        /// <summary>
        /// 发货方式；
        /// </summary>
        public string SendMode;

        /// <summary>
        /// 订单状态；
        /// </summary>
        public string OrderStatus;

        /// <summary>
        /// 开始日期
        /// </summary>
        public string StartDate;

        /// <summary>
        /// 结束日期；
        /// </summary>
        public string EndDate;

        /// <summary>
        /// 排序值
        /// </summary>
        public int Sorts;


        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="IsAutoLoadParams">是否自动加载查询参数</param>
        public QueryOrdersAsPage(bool IsAutoLoadParams)
        {
            if (!IsAutoLoadParams)
                return;
            OrderID = Utility.G("OrderID");
            UserName = Utility.G("UserName");
            PayMode = Utility.G("PayMode");
            SendMode = Utility.G("SendMode");
            OrderStatus = Utility.G("OrderStatus");
            StartDate = Utility.G("StartDate");
            EndDate = Utility.G("EndDate");
            Sorts = Utility.G<int>("Sorts");
            base.CurPage = Utility.G<int>("CurPage");
            if (base.CurPage <= 0) base.CurPage = 1;

            /*
            if (string.IsNullOrEmpty(StartDate))
                StartDate = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd");
            if (string.IsNullOrEmpty(EndDate))
                EndDate = DateTime.Now.ToString("yyyy-MM-dd");
            */
        }


       

    }
}
